Skip to content

Conversation

@jaydeluca
Copy link
Member

Fixes #15009

Add ability for users to customize AutoConfiguredOpenTelemetrySdk, and add cache for environment config lookups.

@jaydeluca jaydeluca requested a review from a team as a code owner October 24, 2025 12:26
@github-actions github-actions bot added the test native This label can be applied to PRs to trigger them to run native tests label Oct 24, 2025
@Override
public String getString(String name) {
String normalizedName = ConfigUtil.normalizeEnvironmentVariableKey(name);
String value = environment.getProperty(normalizedName, String.class);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative approach that could be considered would be to wrap the environment into a caching PropertyResolver. I presume that the sdk deliberately rereads these properties so they could be updated with opamp in the future. Idk whether this is something we should be concerned with.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I presume that the sdk deliberately rereads these properties

no, it was not a deliberate decision as far as I know.

When I worked on the project, I assumed that properties would only be read at startup time.

I think it's hard to anticipate how OpAMP will be integrated, but we may simply flush the cache (from the caching PropertyResolver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spring boot starter test native This label can be applied to PRs to trigger them to run native tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Performance issue in SpringConfigProperties#getInt due to lack of caching

3 participants